 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKIas/IasModel.h>

@implementation State
-(id) initWithLabel:(NSString*) label
      value:(NSString*)value { 
     self.label = label;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self label])
    {
        [result setValue:[self label] forKey:@"label"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.label = [dictionary objectForKey:@"label"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation Application
-(id) initWithClientName:(NSString*) clientName
      tokenEndpointAuthMethod:(NSString*)tokenEndpointAuthMethod
      grantTypes:(NSString*)grantTypes
      redirectUris:(NSString*)redirectUris
      clientUri:(NSString*)clientUri
      logoUri:(NSString*)logoUri
      tosUri:(NSString*)tosUri
      policyUri:(NSString*)policyUri
      scope:(NSString*)scope
      jwksUri:(NSString*)jwksUri
      jwks:(NSString*)jwks
      contacts:(NSString*)contacts
      extension:(NSString*)extension
      accessTokenValiditySeconds:(NSNumber*)accessTokenValiditySeconds
      refreshTokenValiditySeconds:(NSNumber*)refreshTokenValiditySeconds
      multiTenant:(NSNumber*)multiTenant
      secret:(NSString*)secret
      userType:(NSString*)userType { 
     self.clientName = clientName;               
     self.tokenEndpointAuthMethod = tokenEndpointAuthMethod;               
     self.grantTypes = grantTypes;               
     self.redirectUris = redirectUris;               
     self.clientUri = clientUri;               
     self.logoUri = logoUri;               
     self.tosUri = tosUri;               
     self.policyUri = policyUri;               
     self.scope = scope;               
     self.jwksUri = jwksUri;               
     self.jwks = jwks;               
     self.contacts = contacts;               
     self.extension = extension;               
     self.accessTokenValiditySeconds = accessTokenValiditySeconds;               
     self.refreshTokenValiditySeconds = refreshTokenValiditySeconds;               
     self.multiTenant = multiTenant;               
     self.secret = secret;               
     self.userType = userType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientName])
    {
        [result setValue:[self clientName] forKey:@"clientName"];
    }
    if([self tokenEndpointAuthMethod])
    {
        [result setValue:[self tokenEndpointAuthMethod] forKey:@"tokenEndpointAuthMethod"];
    }
    if([self grantTypes])
    {
        [result setValue:[self grantTypes] forKey:@"grantTypes"];
    }
    if([self redirectUris])
    {
        [result setValue:[self redirectUris] forKey:@"redirectUris"];
    }
    if([self clientUri])
    {
        [result setValue:[self clientUri] forKey:@"clientUri"];
    }
    if([self logoUri])
    {
        [result setValue:[self logoUri] forKey:@"logoUri"];
    }
    if([self tosUri])
    {
        [result setValue:[self tosUri] forKey:@"tosUri"];
    }
    if([self policyUri])
    {
        [result setValue:[self policyUri] forKey:@"policyUri"];
    }
    if([self scope])
    {
        [result setValue:[self scope] forKey:@"scope"];
    }
    if([self jwksUri])
    {
        [result setValue:[self jwksUri] forKey:@"jwksUri"];
    }
    if([self jwks])
    {
        [result setValue:[self jwks] forKey:@"jwks"];
    }
    if([self contacts])
    {
        [result setValue:[self contacts] forKey:@"contacts"];
    }
    if([self extension])
    {
        [result setValue:[self extension] forKey:@"extension"];
    }
    if([self accessTokenValiditySeconds])
    {
        [result setValue:[self accessTokenValiditySeconds] forKey:@"accessTokenValiditySeconds"];
    }
    if([self refreshTokenValiditySeconds])
    {
        [result setValue:[self refreshTokenValiditySeconds] forKey:@"refreshTokenValiditySeconds"];
    }
    if([self multiTenant])
    {
        [result setValue:[self multiTenant] forKey:@"multiTenant"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self userType])
    {
        [result setValue:[self userType] forKey:@"userType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientName = [dictionary objectForKey:@"clientName"];
    self.tokenEndpointAuthMethod = [dictionary objectForKey:@"tokenEndpointAuthMethod"];
    self.grantTypes = [dictionary objectForKey:@"grantTypes"];
    self.redirectUris = [dictionary objectForKey:@"redirectUris"];
    self.clientUri = [dictionary objectForKey:@"clientUri"];
    self.logoUri = [dictionary objectForKey:@"logoUri"];
    self.tosUri = [dictionary objectForKey:@"tosUri"];
    self.policyUri = [dictionary objectForKey:@"policyUri"];
    self.scope = [dictionary objectForKey:@"scope"];
    self.jwksUri = [dictionary objectForKey:@"jwksUri"];
    self.jwks = [dictionary objectForKey:@"jwks"];
    self.contacts = [dictionary objectForKey:@"contacts"];
    self.extension = [dictionary objectForKey:@"extension"];
    self.accessTokenValiditySeconds = [dictionary objectForKey:@"accessTokenValiditySeconds"];
    self.refreshTokenValiditySeconds = [dictionary objectForKey:@"refreshTokenValiditySeconds"];
    self.multiTenant = [dictionary objectForKey:@"multiTenant"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.userType = [dictionary objectForKey:@"userType"];
    return self;
}
 @end
@implementation UpdateApplication
-(id) initWithClientName:(NSString*) clientName
      tokenEndpointAuthMethod:(NSString*)tokenEndpointAuthMethod
      grantTypes:(NSString*)grantTypes
      redirectUris:(NSString*)redirectUris
      clientUri:(NSString*)clientUri
      logoUri:(NSString*)logoUri
      tosUri:(NSString*)tosUri
      policyUri:(NSString*)policyUri
      scope:(NSString*)scope
      jwksUri:(NSString*)jwksUri
      jwks:(NSString*)jwks
      contacts:(NSString*)contacts
      extension:(NSString*)extension
      accessTokenValiditySeconds:(NSNumber*)accessTokenValiditySeconds
      refreshTokenValiditySeconds:(NSNumber*)refreshTokenValiditySeconds
      multiTenant:(NSNumber*)multiTenant
      secret:(NSString*)secret
      userType:(NSString*)userType { 
     self.clientName = clientName;               
     self.tokenEndpointAuthMethod = tokenEndpointAuthMethod;               
     self.grantTypes = grantTypes;               
     self.redirectUris = redirectUris;               
     self.clientUri = clientUri;               
     self.logoUri = logoUri;               
     self.tosUri = tosUri;               
     self.policyUri = policyUri;               
     self.scope = scope;               
     self.jwksUri = jwksUri;               
     self.jwks = jwks;               
     self.contacts = contacts;               
     self.extension = extension;               
     self.accessTokenValiditySeconds = accessTokenValiditySeconds;               
     self.refreshTokenValiditySeconds = refreshTokenValiditySeconds;               
     self.multiTenant = multiTenant;               
     self.secret = secret;               
     self.userType = userType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientName])
    {
        [result setValue:[self clientName] forKey:@"clientName"];
    }
    if([self tokenEndpointAuthMethod])
    {
        [result setValue:[self tokenEndpointAuthMethod] forKey:@"tokenEndpointAuthMethod"];
    }
    if([self grantTypes])
    {
        [result setValue:[self grantTypes] forKey:@"grantTypes"];
    }
    if([self redirectUris])
    {
        [result setValue:[self redirectUris] forKey:@"redirectUris"];
    }
    if([self clientUri])
    {
        [result setValue:[self clientUri] forKey:@"clientUri"];
    }
    if([self logoUri])
    {
        [result setValue:[self logoUri] forKey:@"logoUri"];
    }
    if([self tosUri])
    {
        [result setValue:[self tosUri] forKey:@"tosUri"];
    }
    if([self policyUri])
    {
        [result setValue:[self policyUri] forKey:@"policyUri"];
    }
    if([self scope])
    {
        [result setValue:[self scope] forKey:@"scope"];
    }
    if([self jwksUri])
    {
        [result setValue:[self jwksUri] forKey:@"jwksUri"];
    }
    if([self jwks])
    {
        [result setValue:[self jwks] forKey:@"jwks"];
    }
    if([self contacts])
    {
        [result setValue:[self contacts] forKey:@"contacts"];
    }
    if([self extension])
    {
        [result setValue:[self extension] forKey:@"extension"];
    }
    if([self accessTokenValiditySeconds])
    {
        [result setValue:[self accessTokenValiditySeconds] forKey:@"accessTokenValiditySeconds"];
    }
    if([self refreshTokenValiditySeconds])
    {
        [result setValue:[self refreshTokenValiditySeconds] forKey:@"refreshTokenValiditySeconds"];
    }
    if([self multiTenant])
    {
        [result setValue:[self multiTenant] forKey:@"multiTenant"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self userType])
    {
        [result setValue:[self userType] forKey:@"userType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientName = [dictionary objectForKey:@"clientName"];
    self.tokenEndpointAuthMethod = [dictionary objectForKey:@"tokenEndpointAuthMethod"];
    self.grantTypes = [dictionary objectForKey:@"grantTypes"];
    self.redirectUris = [dictionary objectForKey:@"redirectUris"];
    self.clientUri = [dictionary objectForKey:@"clientUri"];
    self.logoUri = [dictionary objectForKey:@"logoUri"];
    self.tosUri = [dictionary objectForKey:@"tosUri"];
    self.policyUri = [dictionary objectForKey:@"policyUri"];
    self.scope = [dictionary objectForKey:@"scope"];
    self.jwksUri = [dictionary objectForKey:@"jwksUri"];
    self.jwks = [dictionary objectForKey:@"jwks"];
    self.contacts = [dictionary objectForKey:@"contacts"];
    self.extension = [dictionary objectForKey:@"extension"];
    self.accessTokenValiditySeconds = [dictionary objectForKey:@"accessTokenValiditySeconds"];
    self.refreshTokenValiditySeconds = [dictionary objectForKey:@"refreshTokenValiditySeconds"];
    self.multiTenant = [dictionary objectForKey:@"multiTenant"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.userType = [dictionary objectForKey:@"userType"];
    return self;
}
 @end
@implementation AppQueryResultItem
-(id) initWithClientId:(NSString*) clientId
      clientName:(NSString*)clientName
      tokenEndpointAuthMethod:(NSString*)tokenEndpointAuthMethod
      grantTypes:(NSString*)grantTypes
      responseTypes:(NSString*)responseTypes
      redirectUris:(NSString*)redirectUris
      clientUri:(NSString*)clientUri
      logoUri:(NSString*)logoUri
      tosUri:(NSString*)tosUri
      policyUri:(NSString*)policyUri
      scope:(NSString*)scope
      jwksUri:(NSString*)jwksUri
      jwks:(NSString*)jwks
      contacts:(NSString*)contacts
      extension:(NSString*)extension
      accessTokenValiditySeconds:(NSNumber*)accessTokenValiditySeconds
      refreshTokenValiditySeconds:(NSNumber*)refreshTokenValiditySeconds
      multiTenant:(NSNumber*)multiTenant
      secretUpdateTime:(NSNumber*)secretUpdateTime
      updateTime:(NSNumber*)updateTime
      createTime:(NSNumber*)createTime
      account:(NSString*)account
      userType:(NSString*)userType
      state:(NSString*)state { 
     self.clientId = clientId;               
     self.clientName = clientName;               
     self.tokenEndpointAuthMethod = tokenEndpointAuthMethod;               
     self.grantTypes = grantTypes;               
     self.responseTypes = responseTypes;               
     self.redirectUris = redirectUris;               
     self.clientUri = clientUri;               
     self.logoUri = logoUri;               
     self.tosUri = tosUri;               
     self.policyUri = policyUri;               
     self.scope = scope;               
     self.jwksUri = jwksUri;               
     self.jwks = jwks;               
     self.contacts = contacts;               
     self.extension = extension;               
     self.accessTokenValiditySeconds = accessTokenValiditySeconds;               
     self.refreshTokenValiditySeconds = refreshTokenValiditySeconds;               
     self.multiTenant = multiTenant;               
     self.secretUpdateTime = secretUpdateTime;               
     self.updateTime = updateTime;               
     self.createTime = createTime;               
     self.account = account;               
     self.userType = userType;               
     self.state = state;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientId])
    {
        [result setValue:[self clientId] forKey:@"clientId"];
    }
    if([self clientName])
    {
        [result setValue:[self clientName] forKey:@"clientName"];
    }
    if([self tokenEndpointAuthMethod])
    {
        [result setValue:[self tokenEndpointAuthMethod] forKey:@"tokenEndpointAuthMethod"];
    }
    if([self grantTypes])
    {
        [result setValue:[self grantTypes] forKey:@"grantTypes"];
    }
    if([self responseTypes])
    {
        [result setValue:[self responseTypes] forKey:@"responseTypes"];
    }
    if([self redirectUris])
    {
        [result setValue:[self redirectUris] forKey:@"redirectUris"];
    }
    if([self clientUri])
    {
        [result setValue:[self clientUri] forKey:@"clientUri"];
    }
    if([self logoUri])
    {
        [result setValue:[self logoUri] forKey:@"logoUri"];
    }
    if([self tosUri])
    {
        [result setValue:[self tosUri] forKey:@"tosUri"];
    }
    if([self policyUri])
    {
        [result setValue:[self policyUri] forKey:@"policyUri"];
    }
    if([self scope])
    {
        [result setValue:[self scope] forKey:@"scope"];
    }
    if([self jwksUri])
    {
        [result setValue:[self jwksUri] forKey:@"jwksUri"];
    }
    if([self jwks])
    {
        [result setValue:[self jwks] forKey:@"jwks"];
    }
    if([self contacts])
    {
        [result setValue:[self contacts] forKey:@"contacts"];
    }
    if([self extension])
    {
        [result setValue:[self extension] forKey:@"extension"];
    }
    if([self accessTokenValiditySeconds])
    {
        [result setValue:[self accessTokenValiditySeconds] forKey:@"accessTokenValiditySeconds"];
    }
    if([self refreshTokenValiditySeconds])
    {
        [result setValue:[self refreshTokenValiditySeconds] forKey:@"refreshTokenValiditySeconds"];
    }
    if([self multiTenant])
    {
        [result setValue:[self multiTenant] forKey:@"multiTenant"];
    }
    if([self secretUpdateTime])
    {
        [result setValue:[self secretUpdateTime] forKey:@"secretUpdateTime"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self account])
    {
        [result setValue:[self account] forKey:@"account"];
    }
    if([self userType])
    {
        [result setValue:[self userType] forKey:@"userType"];
    }
    if([self state])
    {
        [result setValue:[self state] forKey:@"state"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientId = [dictionary objectForKey:@"clientId"];
    self.clientName = [dictionary objectForKey:@"clientName"];
    self.tokenEndpointAuthMethod = [dictionary objectForKey:@"tokenEndpointAuthMethod"];
    self.grantTypes = [dictionary objectForKey:@"grantTypes"];
    self.responseTypes = [dictionary objectForKey:@"responseTypes"];
    self.redirectUris = [dictionary objectForKey:@"redirectUris"];
    self.clientUri = [dictionary objectForKey:@"clientUri"];
    self.logoUri = [dictionary objectForKey:@"logoUri"];
    self.tosUri = [dictionary objectForKey:@"tosUri"];
    self.policyUri = [dictionary objectForKey:@"policyUri"];
    self.scope = [dictionary objectForKey:@"scope"];
    self.jwksUri = [dictionary objectForKey:@"jwksUri"];
    self.jwks = [dictionary objectForKey:@"jwks"];
    self.contacts = [dictionary objectForKey:@"contacts"];
    self.extension = [dictionary objectForKey:@"extension"];
    self.accessTokenValiditySeconds = [dictionary objectForKey:@"accessTokenValiditySeconds"];
    self.refreshTokenValiditySeconds = [dictionary objectForKey:@"refreshTokenValiditySeconds"];
    self.multiTenant = [dictionary objectForKey:@"multiTenant"];
    self.secretUpdateTime = [dictionary objectForKey:@"secretUpdateTime"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.account = [dictionary objectForKey:@"account"];
    self.userType = [dictionary objectForKey:@"userType"];
    self.state = [dictionary objectForKey:@"state"];
    return self;
}
 @end
@implementation ApplicationRes
-(id) initWithClientId:(NSString*) clientId
      clientName:(NSString*)clientName
      tokenEndpointAuthMethod:(NSString*)tokenEndpointAuthMethod
      grantTypes:(NSString*)grantTypes
      responseTypes:(NSString*)responseTypes
      redirectUris:(NSString*)redirectUris
      clientUri:(NSString*)clientUri
      logoUri:(NSString*)logoUri
      tosUri:(NSString*)tosUri
      policyUri:(NSString*)policyUri
      scope:(NSString*)scope
      jwksUri:(NSString*)jwksUri
      jwks:(NSString*)jwks
      contacts:(NSString*)contacts
      extension:(NSString*)extension
      accessTokenValiditySeconds:(NSNumber*)accessTokenValiditySeconds
      refreshTokenValiditySeconds:(NSNumber*)refreshTokenValiditySeconds
      multiTenant:(NSNumber*)multiTenant
      secretUpdateTime:(NSNumber*)secretUpdateTime
      updateTime:(NSNumber*)updateTime
      createTime:(NSNumber*)createTime
      account:(NSString*)account
      userType:(NSString*)userType { 
     self.clientId = clientId;               
     self.clientName = clientName;               
     self.tokenEndpointAuthMethod = tokenEndpointAuthMethod;               
     self.grantTypes = grantTypes;               
     self.responseTypes = responseTypes;               
     self.redirectUris = redirectUris;               
     self.clientUri = clientUri;               
     self.logoUri = logoUri;               
     self.tosUri = tosUri;               
     self.policyUri = policyUri;               
     self.scope = scope;               
     self.jwksUri = jwksUri;               
     self.jwks = jwks;               
     self.contacts = contacts;               
     self.extension = extension;               
     self.accessTokenValiditySeconds = accessTokenValiditySeconds;               
     self.refreshTokenValiditySeconds = refreshTokenValiditySeconds;               
     self.multiTenant = multiTenant;               
     self.secretUpdateTime = secretUpdateTime;               
     self.updateTime = updateTime;               
     self.createTime = createTime;               
     self.account = account;               
     self.userType = userType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientId])
    {
        [result setValue:[self clientId] forKey:@"clientId"];
    }
    if([self clientName])
    {
        [result setValue:[self clientName] forKey:@"clientName"];
    }
    if([self tokenEndpointAuthMethod])
    {
        [result setValue:[self tokenEndpointAuthMethod] forKey:@"tokenEndpointAuthMethod"];
    }
    if([self grantTypes])
    {
        [result setValue:[self grantTypes] forKey:@"grantTypes"];
    }
    if([self responseTypes])
    {
        [result setValue:[self responseTypes] forKey:@"responseTypes"];
    }
    if([self redirectUris])
    {
        [result setValue:[self redirectUris] forKey:@"redirectUris"];
    }
    if([self clientUri])
    {
        [result setValue:[self clientUri] forKey:@"clientUri"];
    }
    if([self logoUri])
    {
        [result setValue:[self logoUri] forKey:@"logoUri"];
    }
    if([self tosUri])
    {
        [result setValue:[self tosUri] forKey:@"tosUri"];
    }
    if([self policyUri])
    {
        [result setValue:[self policyUri] forKey:@"policyUri"];
    }
    if([self scope])
    {
        [result setValue:[self scope] forKey:@"scope"];
    }
    if([self jwksUri])
    {
        [result setValue:[self jwksUri] forKey:@"jwksUri"];
    }
    if([self jwks])
    {
        [result setValue:[self jwks] forKey:@"jwks"];
    }
    if([self contacts])
    {
        [result setValue:[self contacts] forKey:@"contacts"];
    }
    if([self extension])
    {
        [result setValue:[self extension] forKey:@"extension"];
    }
    if([self accessTokenValiditySeconds])
    {
        [result setValue:[self accessTokenValiditySeconds] forKey:@"accessTokenValiditySeconds"];
    }
    if([self refreshTokenValiditySeconds])
    {
        [result setValue:[self refreshTokenValiditySeconds] forKey:@"refreshTokenValiditySeconds"];
    }
    if([self multiTenant])
    {
        [result setValue:[self multiTenant] forKey:@"multiTenant"];
    }
    if([self secretUpdateTime])
    {
        [result setValue:[self secretUpdateTime] forKey:@"secretUpdateTime"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self account])
    {
        [result setValue:[self account] forKey:@"account"];
    }
    if([self userType])
    {
        [result setValue:[self userType] forKey:@"userType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientId = [dictionary objectForKey:@"clientId"];
    self.clientName = [dictionary objectForKey:@"clientName"];
    self.tokenEndpointAuthMethod = [dictionary objectForKey:@"tokenEndpointAuthMethod"];
    self.grantTypes = [dictionary objectForKey:@"grantTypes"];
    self.responseTypes = [dictionary objectForKey:@"responseTypes"];
    self.redirectUris = [dictionary objectForKey:@"redirectUris"];
    self.clientUri = [dictionary objectForKey:@"clientUri"];
    self.logoUri = [dictionary objectForKey:@"logoUri"];
    self.tosUri = [dictionary objectForKey:@"tosUri"];
    self.policyUri = [dictionary objectForKey:@"policyUri"];
    self.scope = [dictionary objectForKey:@"scope"];
    self.jwksUri = [dictionary objectForKey:@"jwksUri"];
    self.jwks = [dictionary objectForKey:@"jwks"];
    self.contacts = [dictionary objectForKey:@"contacts"];
    self.extension = [dictionary objectForKey:@"extension"];
    self.accessTokenValiditySeconds = [dictionary objectForKey:@"accessTokenValiditySeconds"];
    self.refreshTokenValiditySeconds = [dictionary objectForKey:@"refreshTokenValiditySeconds"];
    self.multiTenant = [dictionary objectForKey:@"multiTenant"];
    self.secretUpdateTime = [dictionary objectForKey:@"secretUpdateTime"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.account = [dictionary objectForKey:@"account"];
    self.userType = [dictionary objectForKey:@"userType"];
    return self;
}
 @end
@implementation Pagination
-(id) initWithCurrPageNo:(NSNumber*) currPageNo
      numberPages:(NSNumber*)numberPages
      numberRecords:(NSNumber*)numberRecords
      pageSize:(NSNumber*)pageSize
      startIndex:(NSNumber*)startIndex { 
     self.currPageNo = currPageNo;               
     self.numberPages = numberPages;               
     self.numberRecords = numberRecords;               
     self.pageSize = pageSize;               
     self.startIndex = startIndex;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self currPageNo])
    {
        [result setValue:[self currPageNo] forKey:@"currPageNo"];
    }
    if([self numberPages])
    {
        [result setValue:[self numberPages] forKey:@"numberPages"];
    }
    if([self numberRecords])
    {
        [result setValue:[self numberRecords] forKey:@"numberRecords"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self startIndex])
    {
        [result setValue:[self startIndex] forKey:@"startIndex"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.currPageNo = [dictionary objectForKey:@"currPageNo"];
    self.numberPages = [dictionary objectForKey:@"numberPages"];
    self.numberRecords = [dictionary objectForKey:@"numberRecords"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.startIndex = [dictionary objectForKey:@"startIndex"];
    return self;
}
 @end
 
 


